<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
	<title>首页</title>
	<link rel="stylesheet" href="__PUBLIC__/home/css/common.css?_t={:time()}">
	<script src="__PUBLIC__/home/js/jquery.js"></script>
	<script src="__PUBLIC__/vendors/layer/layer.js"></script>
	<script src="__PUBLIC__/home/js/iscroll.js"></script>
	<script src="__PUBLIC__/home/js/swiper.min.js"></script>
	<link rel="stylesheet" href="__PUBLIC__/home/css/swiper.min.css">
	<!-- <script src="__PUBLIC__/home/js/al.js"></script> -->
</head>
<style>
* {margin:0;padding:0;}
a,a:hover,a:active,a:visited,a:link,a:focus {-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;outline:none;background:none;text-decoration:none;}
.clearfix:after {display:block;clear:both;content:"";visibility:hidden;height:0px;}
.clearfix {zoom:1;}
li {list-style:none;}
.bg_fixed {position:fixed;width:100%;top:0px;left:0px;height:91%;z-index:-1;background:url(__PUBLIC__/home/images/v8_1.png);background-size:100% 100%;}
.footer {height:65px;width:100%;position:fixed;bottom:0px;background:#0a1b0f !important;/*background:url(/images/z7.png);*/background-size:100% 100%;z-index:999;/*box-shadow:0px 0px 10px #aaa;*//*background:rgba(255,255,255,0.1);*/}
.footer ul {}
.footer ul li {float:left;width:33.3%;text-align:center;position:relative;}
.footer ul li a {display:inline-block;width:100%;height:100%;}
.footer ul li a img {width:1.5rem;position:relative;height:1.5rem;top:6px;}
.footer ul li a p {font-size:0.95rem;color:#fff;margin-top:0px;}
.footer ul li a .p1.select {color:#f39800;}
.section_uu {position:fixed;width:100%;text-align:center;top:0px;}
.section_uu .s1 {display:inline-block;/*background:url(/images/title.png);*/background-size:100% 100%;padding:5px 10px;color:#fff;font-size:1.6rem;font-weight:bold;margin:10px 0px;letter-spacing:5px;}
.it_section1 {/*padding:15px;*/padding-top:0px !important;margin-bottom:30px;}
.footer .p1 {margin-top:1px;}
.it_section1 .list {width:90%;padding:25px 0px;margin:0 auto;border-radius:10px;background:url("__PUBLIC__/home/images/v10_a13.png") no-repeat;background-size:100% 100%;position:relative;}
.it_section1 .list .left {float:left;text-align:center;width:45%;/*padding:10px 0px;*/position:relative;/*margin-top:30px;*/margin-left: 10px;height: 168px}
.it_section1 .list .nbm {position:absolute;left:15px;top:15px;}
.it_section1 .list .left .p1{color: #fff;font-size: 0.8rem;position: relative;top: -1px}
.it_section1 .list .nbm .p1 {color:#fff;font-size:0.6rem;background:#e08b30;border-radius:2px;padding:1px 10px;}
.it_section1 .list .left img {width:140px;height:130px;padding-top:10px;}
.it_section1 .list .right {text-align:center;padding:10px 0px;float:right;width:50%;}
.it_section1 .list .right .p1 {font-size:0.85rem;color:#fff;margin:2px 0px;text-align:left;text-indent:0.5rem;margin-bottom:3px;}
.it_section1 .list .right .p2 {text-align:left;margin-top:10px;text-indent:0.5rem;}
.it_section1 .list .right .p2 a {display:inline-block;width:60%;text-align:center;padding:4px 0px;background:#4088d2;border:1px solid #29f5ff;background-size:100% 100%;color:#fff;border-radius:7px;font-size:1rem;margin-left:20px;}
.kongg {height:70px;}
.section_uu {position:relative;}
.it_section1 {padding-top:25px;}
.xing_1 {overflow-y:auto;margin-top:25px;}
.xing_1 .it_section1 {float:left;width:100%;}
.a_abc {width:19px;padding-right:5px;vertical-align:middle;position:relative;top:-1px;}
.v10_section1 img {width:100%;height:170px;}
.v10_section1 .arr {padding:11px;background:url("__PUBLIC__/home/images/v10_a11.png") no-repeat;background-size:100% 100%;background-position:-1px 0px;}
.v10_section1 .arr .rra {overflow:hidden;border-radius:8px;}
.v10_alert_1 .v10_alert_center .p1{color:#fff;}
</style>
<body>
<div class="sectionY sectionY_tttt" style="position: inherit">
	<p class="p1" style="color: #fff">
		<span class="ppp_title">首页</span>
	</p>
</div>
<!--<div class="kong1"></div>-->
<!--新增轮播图-->
<div class="v10_section1">
	<div class="container2">
		<div class="arr">
			<div class="rra">
				<div class="swiper-container" id="mm">
					<div class="swiper-wrapper">
						<div class="swiper-slide">
							<img src="__PUBLIC__/home/images/a9.png"/>
						</div>
						<div class="swiper-slide">
							<img src="__PUBLIC__/home/images/a9.png"/>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<!--新增滚动新闻-->
<div class="v10_section2">
	<div class="container2" style="padding: 0px 23px">
		<div class="v10_section2_1 clearfix">
			<div class="a1">
				<img src="__PUBLIC__/home/images/v10_a12.png" alt="">
			</div>
			<div class="a2">
				<div class="ko">
					<ul class="news_li">
						{foreach $newlist as $v}
						<li class="chao"><a href="{:url('News/details')}?id={$v.id}" >{$v.title}</a></li>
						{/foreach}
					</ul>
					<ul class="swap"></ul>
				</div>
			</div>
		</div>
	</div>
</div>

<div class="bg_fixed_v10_2"></div>
	<input type="hidden" value="{:time()}" id="now_time">
	<input type="hidden" value="{$return_id}" id="return_id">
	<input type="hidden" value="{$return_time}" id="return_time">
	<div class="xing_1 clearfix">
		{foreach $goods_list as $good}
			<div class="it_section1 good_{$good.id}">
				<div class="list clearfix">
					<div class="left">
						<img src="{$good.img_url}" class='goodimg_{$good.id}'>
						<p class="p1 ">{$good.title}</p>
<!--						<img src="__PUBLIC__/home/images/v10_a15.png" alt="">-->
					</div>
					<div class="right">
						<p class="p1 p1x">价值：{$good.price1}-{$good.price2}</p>
						<p class="p1">合约收益：{$good.daynum}天{$good.daypercent}%</p>
						<p class="p1">开放时间：{:date('H:i', $good.start_time)}-{:date('H:i', $good.end_time)}</p>
						<p class="p1">可挖SCB：{$good.botnum}</p>
						<p class="p1">预约共享豆：{$good.point_start}</p>
						<p class="p2 item_last{$good.id}">
							{if $good.can_sale eq 1}
<!--							商品是否可以预约 包含情况：未到时间（即将开始）、到时间（已预约、未预约）、已过时间（已预约、未预约）-->
							<a href="javascript:;" class="a1 a11 ani_ac_btn" data-id="{$good.id}" {if $good.over_status eq 0}onclick="buyproduct('{$good.id}')"{/if}>
							{$good.over_text}</a>
							{elseif $good.can_sale eq 2}
<!--							商品不可购买-->
								<a href="javascript:;" class="a1 a11">待开放</a>
							{/if}
						</p>
					</div>
				</div>
			</div>
	{/foreach}
	</div>

	<div class="kongg"></div>

	{include file="public/newfoot"}
	<!-- 抢购过渡 -->
	<div class="ani_ac">
<!--		预约中-->
		<div class="ALL_1">
			<div class="animition">
				<div class="b1 slide_color">
					<span class="s1 select">预</span>
					<span class="s1">约</span>
					<span class="s1">中</span>
				</div>
				<div class="b2 slide_color1">
						<span class="s1 select">.</span>
						<span class="s1">.</span>
						<span class="s1">.</span>
				</div>
<!--				<div class="b3" style="margin-top: 15px;">-->
<!--					<img src="__PUBLIC__/home/images/shibai.png" class="giveimg" style="width: 60px;height: 66px;" />-->
<!--				</div>-->
			</div>
			<div class="a1">
				<p class="p1">请不要关闭页面</p>
			</div>
		</div>
		<!-- 失败 -->
		<div class="ALL_2" style="display: none;">
			<div class="animition">
<!--				<div class="b4" style="display: block;padding-top: 12px;">-->
<!--					<img src="__PUBLIC__/home/images/shibai.png" class="giveimg" />-->
<!--				</div>-->
				<div class="b5" style="display: block;">
					<p class="p1">抱歉，失败了</p>
				</div>
			</div>
			<div class="anc">
				<a href="javascript:;" class="clear_btn">我知道了</a>
			</div>
		</div>
		<!-- 成功 -->
		<div class="ALL_3" style="display: none;">
			<div class="animition">
<!--				<div class="b4">-->
<!--					<img src="__PUBLIC__/home/images/shibai.png" class="giveimg" />-->
<!--				</div>-->
				<div class="b5">
					<p class="p1 stips">恭喜，成功了</p>
				</div>
			</div>
			<div class="anc">
				<a href="javascript:;" class="clear_btn">我知道了</a>
			</div>
		</div>
	</div>



{if $show_info eq 1}
<!--提示框提示框-->
<div class="v10_alert">
	<div class="v10_alert_1" style="height: 60%;top: 20%">
		<div class="v10_alert_title">
			<p class="p1">{$info.title|default=''}</p>
		</div>
		<div class="v10_alert_center">
			<p class="p1">{$info.content|default=''}</p>
		</div>
		<div class="v10_alert_last">
			<a href="javascript:;" class="close_alert_v10">关闭</a>
		</div>
	</div>
</div>
{/if}


</body>
<script>
</script>
<script>
	$(function () {
		$(".xin_indexsection1_1 .center").css("height",($(window).height()*0.65-82))
	})
</script>
<script>
	$(function(){
		var index = layer.load(1, {
		time:{$load_time},
		shade: [0.8,'#000'] //0.1透明度的白色背景
	});
		//关闭提示框
		$(".close_alert_v10").click(function () {
			$(".v10_alert").hide()
		})


		// 公共提示
		var d_left = $(window).width()-$(".public").width();
		var d_top = $(window).height()-$(".public").height();
		$(".public").css("left",d_left/2);
		$(".public").css("top",d_top/2);
		function public_show() {
			$(".public").fadeIn({$load_time});
			$(".public").fadeOut({$load_time});
		}
		// public_show();
		var d = $(window).height()-60-60;
		// $(".index_section2").css("height",d);
		$(".clear_btn").click(function(){
			clearInterval(time1);
			$(".slide_color .s1").eq(0).addClass("select").siblings().removeClass("select");
			$(".slide_color1 .s1").eq(0).addClass("select").siblings().removeClass("select");
			$(".slide_color1 .s1").removeClass("select");
			$(".ani_ac").hide();
			$(".ani_ac .ALL_1").show();
			$(".ani_ac .ALL_2,.ALL_3").hide();
		})
		//公告详情
		$("#news_detail").click(function () {
			var news_id = $(this).data("news_id");
			location.href = "{:url('News/details')}?id="+news_id;
		});
	})
	setTimeout(function () {
		addminute()
	}, 1000);
	function addminute(){
		/*先获取当前时间戳*/
		var intd = $('#now_time').val();
		intd = parseInt(intd);
		intd = (intd+1);
		$('#now_time').val(intd);
		/*再获取倒计时，时间*/
		var return_id = $("#return_id").val(), return_time = $("#return_time").val();
		var minus = return_time-intd;
		if(minus == 0){
			$(".good_"+return_id).find('a').html('搜寻中');
			$(".good_"+return_id).find('a').removeAttr('onclick')
		}else{
			if(minus<30){
				$(".good_"+return_id).find('a').html('预约（'+minus+'秒)');
			}
			setTimeout(function () {
				addminute()
			}, 1000);
		}
	}
	/*一分钟刷新一次本页面  xuanfeng 20190621*/
	setTimeout(function() {
		window.location.reload();
	},120000);
	var time1;
	// 循环抢购中
	function r1(f,s){
		var time = 0;
		$(".ALL_1 .b1 span").eq(0).html(f);
		$(".ALL_1 .b1 span").eq(1).html(s);
		time1 = setInterval(function(){
			if(time<4){
				$(".slide_color .s1").eq(time).addClass("select").siblings().removeClass("select");
				$(".slide_color1 .s1").eq(time).addClass("select").siblings().removeClass("select");
				time++;
			}if(time==4){
				time=0;
				$(".slide_color .s1").eq(time).addClass("select").siblings().removeClass("select");
				$(".slide_color1 .s1").eq(time).addClass("select").siblings().removeClass("select");
			}
		},500)

	}
	// 循环抢购成功
	function r3(){
		$(".ALL_1").hide();
		$(".ALL_3").show();
		clearInterval(time1);
	}
	// 循环抢购失败
	function r2(msg){
		$(".ALL_1").hide();
		$(".ALL_2 .b5 .p1").text(msg);
		$(".ALL_2").show();
		clearInterval(time1);
	}

	/*开始抢购代码  xuanfeng 20190621*/
	function buyproduct(id){
		if(id=='' || id==undefined){
			layer.alert('系統參數錯誤，請刷新後重試！',{shade:0.2});return false;
		}
		//点击哪一个图片就显示哪一个---start
		if(id>0){
				var thatimg = $('.goodimg_'+id).attr('src');
				$('.giveimg').attr('src',thatimg);
		}
		//点击哪一个图片就显示哪一个---end
		//设置预约产品的图片弹窗
		var thatimg = $('.goodimg_'+id).attr('src');
		$('.giveimg').attr('src',thatimg);
		$(".ani_ac").show();//打开遮罩层
		r1("预", "约");//打开預約中
		$('.stips').html('恭喜，预约成功');
		$.ajax({
			type: 'POST',
			url: "{:url('Index/buyOrder')}",
			dataType: "json",
			data: "id="+id,
			success:function(responsestr){
					var obj=responsestr;
					if(obj.result_code== 0){
						if(obj.result_data.type == 1){
							//預約成功
							$('.item_last'+id+" a").html('待搜寻');
							$('#return_id').val(0);
							$('#return_time').val(0);
							$('.item_last'+id+" a").removeAttr('onclick');
						}else{
							//抢购成功
						}
						r3();
					}else{
						r2(obj.result_info);
						return false;
					}
			},
			error:function(){
				r2('当前访客较多，请稍后再试！','1.png');
			}
		});
	}

</script>
<script>
	// $(".xing_1").css("height",($(window).height()-120))
</script>
<script>
	var swiper = new Swiper('#mm', {
		spaceBetween: 30,
		centeredSlides: true,
		autoplay: {
			delay: 3000,
			disableOnInteraction: false,
		},
		pagination: {
			el: '.swiper-pagination',
			clickable: true,
		},
	});
</script>
<script>
	function b(){
		t = parseInt(x.css('top'));
		y.css('top','19px');
		x.animate({top: t - 19 + 'px'},'slow');	//19为每个li的高度
		if(Math.abs(t) == h-19){ //19为每个li的高度
			y.animate({top:'0px'},'slow');
			z=x;
			x=y;
			y=z;
		}
		setTimeout(b,3000);//滚动间隔时间 现在是3秒
	}
	$(document).ready(function(){
		$('.swap').html($('.news_li').html());
		x = $('.news_li');
		y = $('.swap');
		h = $('.news_li li').length * 19; //19为每个li的高度
		setTimeout(b,3000);//滚动间隔时间 现在是3秒

	})

</script>
</html>
